package com.life.goal.infrastructure.goal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.life.goal.infrastructure.goal.po.UserPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<UserPO> {

    @Select("select count(1) from user where user_name = #{userName}")
    Integer existUserName(String userName);

    @Select("select * from user where user_name = #{userName} and user_password = #{password}")
    UserPO findUserByNameAndPwd(String userName, String password);
}